home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
ruthie
/
ruthie.frm
< prev
next >
Wrap
Text File
|
1995-05-08
|
7KB
|
254 lines
VERSION 2.00
Begin Form Ruthie
Caption = "RuthieWare"
ClientHeight = 3840
ClientLeft = 4020
ClientTop = 750
ClientWidth = 9090
Height = 4530
Icon = RUTHIE.FRX:0000
Left = 3960
LinkMode = 1 'Source
LinkTopic = "Form2"
ScaleHeight = 3840
ScaleWidth = 9090
Top = 120
Width = 9210
Begin PictureBox Actions
AutoRedraw = -1 'True
BorderStyle = 0 'None
Height = 615
Left = 8400
ScaleHeight = 615
ScaleWidth = 1335
TabIndex = 3
Top = 7080
Width = 1335
Begin PictureBox GoToGame2
AutoRedraw = -1 'True
BorderStyle = 0 'None
Height = 495
Left = 720
Picture = RUTHIE.FRX:0302
ScaleHeight = 495
ScaleWidth = 495
TabIndex = 5
Top = 120
Width = 495
End
Begin PictureBox Quit
AutoRedraw = -1 'True
BorderStyle = 0 'None
Height = 495
Left = 0
Picture = RUTHIE.FRX:0604
ScaleHeight = 495
ScaleWidth = 495
TabIndex = 4
Top = 120
Width = 495
End
End
Begin Timer Timer2
Left = 1320
Top = 6960
End
Begin Timer Timer1
Left = 720
Top = 6960
End
Begin PictureBox Background
BorderStyle = 0 'None
Height = 2655
Left = 9720
Picture = RUTHIE.FRX:0906
ScaleHeight = 2655
ScaleWidth = 3495
TabIndex = 6
Top = 360
Visible = 0 'False
Width = 3495
End
Begin PictureBox LiveArea
BorderStyle = 0 'None
Height = 6735
Left = 360
ScaleHeight = 6735
ScaleWidth = 9255
TabIndex = 0
Top = 240
Width = 9255
Begin PictureBox SadFace
BorderStyle = 0 'None
Height = 3615
Left = 2040
Picture = RUTHIE.FRX:27CE
ScaleHeight = 3615
ScaleWidth = 3735
TabIndex = 2
Top = 1440
Visible = 0 'False
Width = 3735
End
Begin PictureBox Picture1
BackColor = &H000000FF&
Height = 1575
Left = 1680
ScaleHeight = 1545
ScaleWidth = 1545
TabIndex = 1
Top = 720
Width = 1575
End
End
Begin Menu File
Caption = "&File"
Begin Menu FileAbout
Caption = "&About Ruthie"
End
Begin Menu FileExit
Caption = "E&xit"
End
End
Begin Menu Game
Caption = "&Game"
Begin Menu GameGame1
Caption = "Game &1"
Checked = -1 'True
End
Begin Menu GameGame2
Caption = "Game &2"
End
Begin Menu GameGame3
Caption = "Game &3"
End
End
Begin Menu Instructions
Caption = "&Instructions"
Begin Menu InstructionsGame1
Caption = "Playing Game &1"
End
End
End
Sub FileAbout_Click ()
Open2.Show 1
End Sub
Sub FileExit_Click ()
End
End Sub
Sub Form_Click ()
SadFace.ScaleWidth = Ruthie.ScaleWidth / 2.5
SadFace.ScaleHeight = SadFace.ScaleWidth
SadFace.Left = (Ruthie.ScaleWidth - SadFace.ScaleWidth) / 2 ' Position SadFace, but don't resize it
SadFace.Top = (Ruthie.ScaleHeight - SadFace.ScaleHeight) / 2
SadFace.Visible = True
Timer2.Interval = HowLong
End Sub
Sub Form_Load ()
Ruthie.Width = Screen.Width * .75 ' Set height of form.
Ruthie.Height = Screen.Height * .75 ' Set width of form.
Ruthie.Left = (Screen.Width - Width) / 2 ' Center form horizontally.
Ruthie.Top = (Screen.Height - Height) / 2 ' Center form vertically.
Initialize ' Define shapes, sizes, placements
End Sub
Sub Form_Resize ()
Scale ' Reset scale to twips
If Ruthie.Height > 100 Then Initialize ' If the Height is smaller, than it's been
' minimized. We don't want to initialize if
' that's the case.
End Sub
Sub GameGame1_Click ()
MsgBox "Umm... You're already playing Game 1", 0, Header
End Sub
Sub GameGame2_Click ()
Ruthie.Hide
Game2.Show
End Sub
Sub GameGame3_Click ()
Ruthie.Hide
Game3.Show
End Sub
Sub GoToGame2_Click ()
Ruthie.Hide
Game2.Show
End Sub
Sub Initialize ()
Ruthie.Scale (0, 0)-(100, 75) ' Define the scale for the form
LiveArea.Scale (0, 0)-(100, 75) ' Define the live area scale
LiveArea.Width = Ruthie.ScaleWidth ' Place LiveArea
LiveArea.Height = Ruthie.ScaleHeight * .7
LiveArea.Left = (Ruthie.ScaleWidth - LiveArea.Width) / 2
LiveArea.Top = 5
Background.Width = Ruthie.ScaleWidth * .8 ' Place Background
Background.Height = Ruthie.ScaleHeight * .8
Background.Left = (Ruthie.ScaleWidth - LiveArea.Width) / 2
Background.Top = (Ruthie.ScaleHeight - LiveArea.Height) / 2
Picture1.Left = 25
Picture1.Top = 25
Actions.Left = 80 ' Place the action icons (Stop, Game2, etc.)
Actions.Top = 68
Actions.Refresh
Quit.Refresh
GoToGame2.Refresh
Randomize ' Reseed the random number generator
End Sub
Sub InstructionsGame1_Click ()
InstGame1.Show MODAL
End Sub
Sub LiveArea_Click ()
Form_Click
End Sub
Sub Picture1_Click ()
Dim WidthFree As Integer, HeightFree As Integer
Background.Visible = True
' *** We've beeped, and turned on the picture. Now we
' want to move the button before we launch the timer.
WidthFree = LiveArea.ScaleWidth - Picture1.Width
HeightFree = LiveArea.ScaleHeight - Picture1.Height
Picture1.Move (Int(WidthFree * Rnd)), (Int(HeightFree * Rnd))
' *** Now, if that worked, we'll set the timer. When it's done,
' it will turn the background picture off, and we'll start
' again.
Timer1.Interval = HowLong
End Sub
Sub Quit_Click ()
End
End Sub
Sub Timer1_Timer ()
Background.Visible = False
Picture1.Refresh
End Sub
Sub Timer2_Timer ()
SadFace.Visible = False
End Sub